3.185 \(\int (d+e x)^2 \log (c (a+b x^2)^p) \, dx\)

Optimal. Leaf size=141 \[ \frac{2 \sqrt{a} p \left (3 b d^2-a e^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{3 b^{3/2}}+\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}-\frac{d p \left (b d^2-3 a e^2\right ) \log \left (a+b x^2\right )}{3 b e}-\frac{2 p x \left (3 b d^2-a e^2\right )}{3 b}-d e p x^2-\frac{2}{9} e^2 p x^3 \]

[Out]

(-2*(3*b*d^2 - a*e^2)*p*x)/(3*b) - d*e*p*x^2 - (2*e^2*p*x^3)/9 + (2*Sqrt[a]*(3*b*d^2 - a*e^2)*p*ArcTan[(Sqrt[b
]*x)/Sqrt[a]])/(3*b^(3/2)) - (d*(b*d^2 - 3*a*e^2)*p*Log[a + b*x^2])/(3*b*e) + ((d + e*x)^3*Log[c*(a + b*x^2)^p
])/(3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.132159, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2463, 801, 635, 205, 260} \[ \frac{2 \sqrt{a} p \left (3 b d^2-a e^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{3 b^{3/2}}+\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}-\frac{d p \left (b d^2-3 a e^2\right ) \log \left (a+b x^2\right )}{3 b e}-\frac{2 p x \left (3 b d^2-a e^2\right )}{3 b}-d e p x^2-\frac{2}{9} e^2 p x^3 \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*Log[c*(a + b*x^2)^p],x]

[Out]

(-2*(3*b*d^2 - a*e^2)*p*x)/(3*b) - d*e*p*x^2 - (2*e^2*p*x^3)/9 + (2*Sqrt[a]*(3*b*d^2 - a*e^2)*p*ArcTan[(Sqrt[b
]*x)/Sqrt[a]])/(3*b^(3/2)) - (d*(b*d^2 - 3*a*e^2)*p*Log[a + b*x^2])/(3*b*e) + ((d + e*x)^3*Log[c*(a + b*x^2)^p
])/(3*e)

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_.)*(x_))^(r_.), x_Symbol] :> Simp[((
f + g*x)^(r + 1)*(a + b*Log[c*(d + e*x^n)^p]))/(g*(r + 1)), x] - Dist[(b*e*n*p)/(g*(r + 1)), Int[(x^(n - 1)*(f
 + g*x)^(r + 1))/(d + e*x^n), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x] && (IGtQ[r, 0] || RationalQ[n
]) && NeQ[r, -1]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int (d+e x)^2 \log \left (c \left (a+b x^2\right )^p\right ) \, dx &=\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}-\frac{(2 b p) \int \frac{x (d+e x)^3}{a+b x^2} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}-\frac{(2 b p) \int \left (\frac{e \left (3 b d^2-a e^2\right )}{b^2}+\frac{3 d e^2 x}{b}+\frac{e^3 x^2}{b}-\frac{a e \left (3 b d^2-a e^2\right )-b d \left (b d^2-3 a e^2\right ) x}{b^2 \left (a+b x^2\right )}\right ) \, dx}{3 e}\\ &=-\frac{2 \left (3 b d^2-a e^2\right ) p x}{3 b}-d e p x^2-\frac{2}{9} e^2 p x^3+\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}+\frac{(2 p) \int \frac{a e \left (3 b d^2-a e^2\right )-b d \left (b d^2-3 a e^2\right ) x}{a+b x^2} \, dx}{3 b e}\\ &=-\frac{2 \left (3 b d^2-a e^2\right ) p x}{3 b}-d e p x^2-\frac{2}{9} e^2 p x^3+\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}-\frac{\left (2 d \left (b d^2-3 a e^2\right ) p\right ) \int \frac{x}{a+b x^2} \, dx}{3 e}+\frac{\left (2 a \left (3 b d^2-a e^2\right ) p\right ) \int \frac{1}{a+b x^2} \, dx}{3 b}\\ &=-\frac{2 \left (3 b d^2-a e^2\right ) p x}{3 b}-d e p x^2-\frac{2}{9} e^2 p x^3+\frac{2 \sqrt{a} \left (3 b d^2-a e^2\right ) p \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{3 b^{3/2}}-\frac{d \left (b d^2-3 a e^2\right ) p \log \left (a+b x^2\right )}{3 b e}+\frac{(d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )}{3 e}\\ \end{align*}

Mathematica [A]  time = 0.455879, size = 211, normalized size = 1.5 \[ \frac{3 p \left (-3 \sqrt{-a} b d^2 e+3 a \sqrt{b} d e^2+\sqrt{-a} a e^3-b^{3/2} d^3\right ) \log \left (\sqrt{-a}-\sqrt{b} x\right )-3 p \left (-3 \sqrt{-a} b d^2 e-3 a \sqrt{b} d e^2+\sqrt{-a} a e^3+b^{3/2} d^3\right ) \log \left (\sqrt{-a}+\sqrt{b} x\right )+\sqrt{b} \left (3 b (d+e x)^3 \log \left (c \left (a+b x^2\right )^p\right )+6 a e^3 p x-b e p x \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )}{9 b^{3/2} e} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*Log[c*(a + b*x^2)^p],x]

[Out]

(3*(-(b^(3/2)*d^3) - 3*Sqrt[-a]*b*d^2*e + 3*a*Sqrt[b]*d*e^2 + Sqrt[-a]*a*e^3)*p*Log[Sqrt[-a] - Sqrt[b]*x] - 3*
(b^(3/2)*d^3 - 3*Sqrt[-a]*b*d^2*e - 3*a*Sqrt[b]*d*e^2 + Sqrt[-a]*a*e^3)*p*Log[Sqrt[-a] + Sqrt[b]*x] + Sqrt[b]*
(6*a*e^3*p*x - b*e*p*x*(18*d^2 + 9*d*e*x + 2*e^2*x^2) + 3*b*(d + e*x)^3*Log[c*(a + b*x^2)^p]))/(9*b^(3/2)*e)

________________________________________________________________________________________

Maple [C]  time = 0.72, size = 965, normalized size = 6.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*ln(c*(b*x^2+a)^p),x)

[Out]

-1/2*I*e*Pi*d*x^2*csgn(I*(b*x^2+a)^p)*csgn(I*c*(b*x^2+a)^p)*csgn(I*c)+2/3/b*a*p*e^2*x+ln(c)*d^2*x+1/3*e^2*ln(c
)*x^3-1/3/e*p*ln(-a^2*e^3+3*a*b*d^2*e-(-a^3*b*e^6+6*a^2*b^2*d^2*e^4-9*a*b^3*d^4*e^2)^(1/2)*x)*d^3-1/3/e*p*ln(-
a^2*e^3+3*a*b*d^2*e+(-a^3*b*e^6+6*a^2*b^2*d^2*e^4-9*a*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a)^p)^2*csgn(I*c)+1/2*I
*e*Pi*d*x^2*csgn(I*(b*x^2+a)^p)*csgn(I*c*(b*x^2+a)^p)^2-1/2*I*Pi*d^2*csgn(I*(b*x^2+a)^p)*csgn(I*c*(b*x^2+a)^p)
*csgn(I*c)*x

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x^2+a)^p),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.05403, size = 709, normalized size = 5.03 \begin{align*} \left [-\frac{2 \, b e^{2} p x^{3} + 9 \, b d e p x^{2} - 3 \,{\left (3 \, b d^{2} - a e^{2}\right )} p \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} + 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) + 6 \,{\left (3 \, b d^{2} - a e^{2}\right )} p x - 3 \,{\left (b e^{2} p x^{3} + 3 \, b d e p x^{2} + 3 \, b d^{2} p x + 3 \, a d e p\right )} \log \left (b x^{2} + a\right ) - 3 \,{\left (b e^{2} x^{3} + 3 \, b d e x^{2} + 3 \, b d^{2} x\right )} \log \left (c\right )}{9 \, b}, -\frac{2 \, b e^{2} p x^{3} + 9 \, b d e p x^{2} - 6 \,{\left (3 \, b d^{2} - a e^{2}\right )} p \sqrt{\frac{a}{b}} \arctan \left (\frac{b x \sqrt{\frac{a}{b}}}{a}\right ) + 6 \,{\left (3 \, b d^{2} - a e^{2}\right )} p x - 3 \,{\left (b e^{2} p x^{3} + 3 \, b d e p x^{2} + 3 \, b d^{2} p x + 3 \, a d e p\right )} \log \left (b x^{2} + a\right ) - 3 \,{\left (b e^{2} x^{3} + 3 \, b d e x^{2} + 3 \, b d^{2} x\right )} \log \left (c\right )}{9 \, b}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x^2+a)^p),x, algorithm="fricas")

[Out]

[-1/9*(2*b*e^2*p*x^3 + 9*b*d*e*p*x^2 - 3*(3*b*d^2 - a*e^2)*p*sqrt(-a/b)*log((b*x^2 + 2*b*x*sqrt(-a/b) - a)/(b*
x^2 + a)) + 6*(3*b*d^2 - a*e^2)*p*x - 3*(b*e^2*p*x^3 + 3*b*d*e*p*x^2 + 3*b*d^2*p*x + 3*a*d*e*p)*log(b*x^2 + a)
 - 3*(b*e^2*x^3 + 3*b*d*e*x^2 + 3*b*d^2*x)*log(c))/b, -1/9*(2*b*e^2*p*x^3 + 9*b*d*e*p*x^2 - 6*(3*b*d^2 - a*e^2
)*p*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) + 6*(3*b*d^2 - a*e^2)*p*x - 3*(b*e^2*p*x^3 + 3*b*d*e*p*x^2 + 3*b*d^2*p*x
 + 3*a*d*e*p)*log(b*x^2 + a) - 3*(b*e^2*x^3 + 3*b*d*e*x^2 + 3*b*d^2*x)*log(c))/b]

________________________________________________________________________________________

Sympy [A]  time = 39.4453, size = 309, normalized size = 2.19 \begin{align*} \begin{cases} - \frac{i a^{\frac{3}{2}} e^{2} p \log{\left (a + b x^{2} \right )}}{3 b^{2} \sqrt{\frac{1}{b}}} + \frac{2 i a^{\frac{3}{2}} e^{2} p \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + x \right )}}{3 b^{2} \sqrt{\frac{1}{b}}} + \frac{i \sqrt{a} d^{2} p \log{\left (a + b x^{2} \right )}}{b \sqrt{\frac{1}{b}}} - \frac{2 i \sqrt{a} d^{2} p \log{\left (- i \sqrt{a} \sqrt{\frac{1}{b}} + x \right )}}{b \sqrt{\frac{1}{b}}} + \frac{a d e p \log{\left (a + b x^{2} \right )}}{b} + \frac{2 a e^{2} p x}{3 b} + d^{2} p x \log{\left (a + b x^{2} \right )} - 2 d^{2} p x + d^{2} x \log{\left (c \right )} + d e p x^{2} \log{\left (a + b x^{2} \right )} - d e p x^{2} + d e x^{2} \log{\left (c \right )} + \frac{e^{2} p x^{3} \log{\left (a + b x^{2} \right )}}{3} - \frac{2 e^{2} p x^{3}}{9} + \frac{e^{2} x^{3} \log{\left (c \right )}}{3} & \text{for}\: b \neq 0 \\\left (d^{2} x + d e x^{2} + \frac{e^{2} x^{3}}{3}\right ) \log{\left (a^{p} c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*ln(c*(b*x**2+a)**p),x)

[Out]

Piecewise((-I*a**(3/2)*e**2*p*log(a + b*x**2)/(3*b**2*sqrt(1/b)) + 2*I*a**(3/2)*e**2*p*log(-I*sqrt(a)*sqrt(1/b
) + x)/(3*b**2*sqrt(1/b)) + I*sqrt(a)*d**2*p*log(a + b*x**2)/(b*sqrt(1/b)) - 2*I*sqrt(a)*d**2*p*log(-I*sqrt(a)
*sqrt(1/b) + x)/(b*sqrt(1/b)) + a*d*e*p*log(a + b*x**2)/b + 2*a*e**2*p*x/(3*b) + d**2*p*x*log(a + b*x**2) - 2*
d**2*p*x + d**2*x*log(c) + d*e*p*x**2*log(a + b*x**2) - d*e*p*x**2 + d*e*x**2*log(c) + e**2*p*x**3*log(a + b*x
**2)/3 - 2*e**2*p*x**3/9 + e**2*x**3*log(c)/3, Ne(b, 0)), ((d**2*x + d*e*x**2 + e**2*x**3/3)*log(a**p*c), True
))

________________________________________________________________________________________

Giac [A]  time = 1.20983, size = 247, normalized size = 1.75 \begin{align*} \frac{2 \, a d^{2} p \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b}} - \frac{2 \, a^{2} p \arctan \left (\frac{b x}{\sqrt{a b}}\right ) e^{2}}{3 \, \sqrt{a b} b} + \frac{3 \, b p x^{3} e^{2} \log \left (b x^{2} + a\right ) + 9 \, b d p x^{2} e \log \left (b x^{2} + a\right ) - 2 \, b p x^{3} e^{2} - 9 \, b d p x^{2} e + 9 \, b d^{2} p x \log \left (b x^{2} + a\right ) + 3 \, b x^{3} e^{2} \log \left (c\right ) + 9 \, b d x^{2} e \log \left (c\right ) - 18 \, b d^{2} p x + 9 \, a d p e \log \left (b x^{2} + a\right ) + 9 \, b d^{2} x \log \left (c\right ) + 6 \, a p x e^{2}}{9 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x^2+a)^p),x, algorithm="giac")

[Out]

2*a*d^2*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - 2/3*a^2*p*arctan(b*x/sqrt(a*b))*e^2/(sqrt(a*b)*b) + 1/9*(3*b*p*x^3
*e^2*log(b*x^2 + a) + 9*b*d*p*x^2*e*log(b*x^2 + a) - 2*b*p*x^3*e^2 - 9*b*d*p*x^2*e + 9*b*d^2*p*x*log(b*x^2 + a
) + 3*b*x^3*e^2*log(c) + 9*b*d*x^2*e*log(c) - 18*b*d^2*p*x + 9*a*d*p*e*log(b*x^2 + a) + 9*b*d^2*x*log(c) + 6*a
*p*x*e^2)/b